package com.central.apps.controller;

import com.central.app.service.HandlerService;
import com.central.apps.entity.BlMessage;
import com.central.common.web.Result;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

@Slf4j
@Api(tags = "公告")
@CrossOrigin
@RestController
@RequestMapping("/notice")
public class NoticeController {
    @Autowired
    private HandlerService handlerService;

    @PostMapping("/updateNotice")
    public Result<?> updateMessage(@RequestBody Map<String, Object> map) {
        try {
            handlerService.update("gq_notice",map);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return Result.succeed(1, "修改成功");
    }
}
